<template>
  <div class="card">
    <div class="header" :class="{'border-bottom': !plain, 'pb-3': !plain}">>
      <i class="iconfont " :class="icon"></i>
      <div class="title  ">
        <h2  style="font-weight: bold">{{title}}</h2>
      </div>
      <i class="iconfont iconcaidan" v-if="!plain"></i>
    </div>
    <div class="card-body ">
      <slot></slot>
    </div>
  </div>

</template>

<script>
export default {
  name: 'card',
  props: {
    icon: { type: String, required: true },
    title: { type: String, required: true },
    plain: { type: Boolean }
  }
}
</script>

<style lang="scss" scoped>
  .card{
    margin-top: .25rem;
    padding: 0 .34rem;
    background-color: white;
    .header{
      .iconfont{
        font-weight: bold;
      }
      display: flex;
      align-items: center;
      zoom: 1;
      height: .39rem;
      line-height: .39rem;
      overflow: hidden;
      margin-bottom: .24rem;
      padding: .3rem 0;
      .title{
        margin-left: .2rem;
        flex: 1;
      }
    }
    .card-body{
    }
  }

</style>
